#include<iostream>
#include<unordered_map>
using namespace std;
unordered_map<int, int>mp;
typedef long long LL;
int n;
int main()
{
	cin >> n;
	while (n--) {
		int x;
		cin >> x;
		for (int i = 2; i <= x / i; i++) {
			while (x % i == 0) {
				mp[i]++;
				x /= i;
			}
		}
		if (x > 1) {
			mp[x]++;
		}
	}
	LL ans = 1;
	for (auto x : mp) {
		int a = x.first, b = x.second;
		LL t = 1;
		while (b--) {
			t = (t * a + 1);
		}
		ans *= t;
	}
	cout << ans << endl;
	return 0;
}